home *** CD-ROM | disk | FTP | other *** search
- Stage
- PRG formatted GEOS file V1.0
- LA-50
- 4!STAGE
- BLASTER'S CONVERTER V2.5
- ,'RunDA
- 4$DL.lnk
- Write Image V2.1
- geoWrite V2.0
- 0 This module contains the source code for an advanced Geos 64 Listbox.
- This source file was written by
- Joseph Buckley.
- Major portions of this file were
- written by William Coleman and available
- from him directly.
- You are free to use this code in
- your own programs and to modify it to suit your
- programming needs but please make notes where
- any modifications are made.
- For more information contact:
- Joseph Buckley
- 464 Beale St.
- W. Quincy, MA 02169-1307
- Red Storm via Quantum Link
- 71570,2600 via CompuServe
- (GEOS Section Leader, CBMPRG forum)
- There are two custom assembly
- macros used in this file:
- .macro ClrB dest
- lda #$00
- sta dest
- .endm
- .macro ClrW dest
- lda #$00
- sta dest
- sta dest+1
- .endm
- The two routines 'WhichMode' and
- 'GeneralError' may
- There are two custom assembly
- macros used in this file:
- .macro ClrB dest
- lda #$00
- sta dest
- .endm
- .macro ClrW dest
- lda #$00
- sta dest
- sta dest+1
- .endm
- The two routines 'WhichMode' and
- 'GeneralError' may be found in the companion
- file 'RunDA'.
- .if Pass1
- .noeqin
- .noglbl
- .include geosSym
- .include geosMac
- .eqin
- .glbl
- .endif
- BOXWITH = 124 ;Width of filebox
- NAMEHITE = 10 ;Height of name region
- MAX_IN_VIEW = 7 ;Number of files sho
- .if Pass1
- .noeqin
- .noglbl
- .include geosSym
- .include geosMac
- .eqin
- .glbl
- .endif
- BOXWITH = 124 ;Width of filebox
- NAMEHITE = 10 ;Height of name region
- MAX_IN_VIEW = 7 ;Number of files shown in box
- BOXHITE = NAMEHITE*MAX_IN_VIEW+1
- BOXTOP = DEF_DB_TOP+4
- BOXBOTTOM = BOXTOP+BOXHITE
- BOXLEFT = DEF_DB_LEFT+3
- BOXRIGHT = BOXLEFT+BOXWITH
- Files_To_Get = 160 ; number of files to search for
- Stage:
- ; Preparation for this subroutine call is
- Stage:
- ; Preparation for this subroutine call is
- ; minor:
- ; Load the variable DATA_TYPE with the GEOS
- ; constant for the file type that you wish to
- ; search for (eg. NOT_GEOS, APPL_DATA, etc.).
- ; If you wish to filter the GEOS files
- ; according to the 'Permanent Name String',
- ; you must change the contents of 'ClassString'
- ; to conform to the files you need.
- ; You program's initialization routine must
- ; contain a call to 'InitDrives' and you must
- ; call 'ResetDrives' before calling
- ; 'EnterDeskTop'.
- ; You program's initialization routine must
- ; also set the values of the two variables
- ; 'SourceDrive' and 'TargetDrive' to the value
- ; of 'curDrive'.
- LoadB selected,$01 ; select first file
- jsr i_FillRam ; zero file name buffer
- .word Files_To_Get*17
- .word FNameBuffer
- .byte 0
- jsr OpenDisk ; log current disk
- jsr DiskNames ; get disk names
- lda curDrive ; use curDrive as an index
- sub #$08 ; for current disk name
- ldx NamesLow,y ; get proper name buffer
- lda NamesHigh,y
- stx r8L ; use r8 for DB access
- sta r8H
- LoadW r6,FNameBuffer ; pointer to name buffer
- ClrW r10 ; default to no 'Class' string
- LoadB r7H,Files_To_Get ; # of file names to seek
- MoveB DATA_TYPE,r7L ; type of files to seek
- beq 1$
- LoadW r10,ClassString ; if a GEOS file, filter type
- ; The 'ClassString' text is used to further
- ; filter the file types according to a string
- ; in the file header.
- ; If you do not wish to use this feature,
- ; leave r10 at $0000.
- 1$ jsr FindFTypes ; get file names
- lda #Files_To_Get ; max # sought
- sub r7H ; minus # left to find
- sta FileTemp ; store # found
- LoadW r0,DrivesDB
- ClrW Drive ; default to one drive
- lda numDrives ; do we have two?
- cmp #$01
- beq 2$ ; no, then skip
- LoadW Drive,DriveIcon ; yes, then use two drive dialog box
- 2$ ClrW OldName ; zero file name buffer
- LoadW r5,OldName ; buffer for file name
- jsr DoDlgBox
- lda sysDBData ; what DB choice was made?
- cmp #CANCEL ; did we CANCEL?
- bne 3$
- ; Sinc
- 2$ ClrW OldName ; zero file name buffer
- LoadW r5,OldName ; buffer for file name
- jsr DoDlgBox
- lda sysDBData ; what DB choice was made?
- cmp #CANCEL ; did we CANCEL?
- bne 3$
- ; Since this subroutine is designed to run
- ; from the main level of the application code,
- ; or actually the level called by a menu
- ; selection, we can quickly return to the menu
- ; handler by pulling one return address. The
- ; next return address on the stack will bring
- ; us directly to the menu handler for a new
- ; selection.
- pla ; yes, CANCEL
- 3$ cmp #DISK ; change disks?
- bne 4$
- LoadW
- r0,DiskChange ; yes, put up change DB
- jsr DoDlgBox
- jmp Stage ; loop back to start
- 4$ cmp #DBUSRICON ; change drives?
- bne 5$
- jmp Stage ; yes, service routine does this
- 5$ MoveB selected,r0 ; OPEN must have been selected
- dec r0 ; file name position in list
- LoadB r1,$11 ; 17 chars per name
- ldx #r0
- ldy #r1
- jsr BBMult ; calc byte position in list
- AddVW FNameBuffer,r0 ; calc poisition in RAM
- LoadW r1,OldName
- ldy #r1
- jsr CopyString ; copy to generic buffer
- lda OldName ; is there a file name?
- bne DoNewName
- LoadW r0,NoFileDB ; no, put up error DB
- jsr DoDlgBox
- jmp Stage
- DoNewName:
- ; This rou
- DoNewName:
- ; This routine may be removed for any
- ; application which does not require the
- ; generation of a new file name.
- ; The new name defaults to the old name with
- ; the addition of the '+' character at the end.
- ; if the old name contained 16 characters, then
- ; the last character will be replaced by the
- ; '+'.
- LoadW r0,OldName
- LoadW r1,NewName
- ldx #r0
- ldy #r1
- jsr CopyString ; copy to new name buffer
- ldy #$00
- 1$ lda NewName,y ; search for terminator
- beq 2$
- cpy #$10
- bne 1$
- 2$ lda #$2b
- sta NewName,y ; add '+'
- lda #$00
- sta NewName,y
- ; add terminator
- sty NewLength
- DriveDecision:
- ClrW Drive ; set for one drive
- DriveDecision:
- ClrW Drive ; set for one drive
- lda numDrives ; test for more
- cmp #$01
- beq 1$
- LoadW Drive,DriveIcon ; set for two or more drives
- 1$ MoveB curDrive,SourceDrive
- ; flag drive which has original
- ; file on it
- jsr GetNewName ; test for valid default file name
- 2$ LoadW r5,NewName ; file name text for DB
- LoadW r0,TargetDisk ; manual file name generator
- jsr DoDlgBox
- lda sysDBData
- cmp #CANCEL ; did we CANCEL?
- bne 3$
- pla ; yes, pull return address
- pla ; for same reason as earlier
- 3$ cmp #DBUSRICON ; did we change drives?
- beq 2$ ; if so, run options again
- LoadW r6,NewName ; search for this new name
- jsr FindFile ; do it
- cpx #$05 ; 'File Not Found'?
- beq 5$ ; if not found, valid name, continue
- bne 4$ ; if other error, flag it
- LoadW r0,FileExists ; only if not found
- jsr DoDlgBox ; call this DB
- bra 2$
- 4$ jsr GeneralError ; otherwise, generate generic error DB
- bra 2$ ; try for new name option
- 5$ MoveB curDrive,TargetDrive
- ; curDrive is where Target file should go
- rts ; finished
- GetNewName:
- ; This routine will search the TargetDrive
- ; for the NewName. If it is found, then a new
- ; file name is generated by incrementing the
- GetNewName:
- ; This routine will search the TargetDrive
- ; for the NewName. If it is found, then a new
- ; file name is generated by incrementing the
- ; value of the character preceding the '+' by
- ; one.
- jsr GotoTarget
- LoadW r6,NewName
- jsr FindFile ; search for file
- cpx #$00 ; no error?
- bne 2$ ; if error, assume 'Not Found'
- dec NewLength ; create pointer to char
- dec NewLength ; before '+'/NULL pair
- lda #'/' ; default to '/' [ASCII(0)-1]
- ldx NewLength ; new index
- sta NewName,x ; change char
- 1$ ldx NewLength ; new index
- inc NewName,x ; increment char from '0' onward
- LoadW r6,NewName
- jsr FindFile ; search for file
- cpx #$00 ; no error?
- beq 1$ ; if none, it was found and
- ; must continue generating
- ; new names
- ; if error, assume 'Not Found'
- 2$ rts ; exit
- FileExists:
- .byte DEF_DB_POS | $01
- .byte DB_USR_ROUT
- .word SetWindow
- .byte DBTXTSTR,$01,$01
- .word ExistsText
- .byte OK,$11,$40,$00
- ExistsText:
- .byte CR,CR,BOLDON," This file already exists.",0
- DiskChange:
- .byte DEF_DB_POS | $01
- .byte DBTXTSTR,$08,$1e
- .word InsrtNDsk
- .byte OK,$11,$41,0
- InsrtNDsk:
- .byte BOLDON,"Please insert new disk.",0
- NoFileDB:
- .byte DEF_DB_POS | $01
- .byte DBTXTSTR,$08,$1e
- .word FilNotFnd
- .byte OK,$11,$41,0
- FilNotFnd:
- .byte BOLDON,"File not found.",0
- TargetDisk:
- .byte DEF_DB_POS | $01
- .byte DB_USR_ROUT
- .word SetWindow
- .byte DBTXTSTR,$01,$01
- .word TargetText
- .byte DB_USR_ROUT
- .word PrintDrive
- .byte DBGETSTRING,$18,$28,r5,$10
- .byte DBUSRICON,$0a,$40
- .word Drive
- .byte CANCEL,$11,$40,0
- TargetText:
- .byte CR,CR,BOLDON,"Please enter filename on",CR,"Drive ",0
- PrintDrive:
- lda curDrive
- adc #56
- jsr PutChar
- lda #':'
- jsr PutChar
- lda #PLAINTEXT
- jmp PutChar
- NamesLow:
- .byte <DriveAName,<DriveBName,<DriveCName
- NamesHigh:
- .byte >DriveAName,>DriveBName,>DriveCName
- DiskNames: ; save disk names to text buffers for target drive DB
- LoadW r0,DrACurDkNm
- LoadW r1,DriveAName
- jsr CopyNames
- LoadW r0,DrBCurDkNm
- DiskNames: ; save disk names to text buffers for target drive DB
- LoadW r0,DrACurDkNm
- LoadW r1,DriveAName
- jsr CopyNames
- LoadW r0,DrBCurDkNm
- LoadW r1,DriveBName
- jsr CopyNames
- LoadW r0,DrCCurDkNm
- LoadW r1,DriveCName
- CopyNames:
- ldy #$00
- 1$ MoveB "(r0),y","(r1),y"
- bmi 2$
- cpy #$10
- bne 1$
- 2$ ClrB
- "(r1),y"
- ClassString:
- .byte "Paint Image",0
- DrivesDB:
- .byte DEF_DB_POS | $01
- .byte DB_
- DrivesDB:
- .byte DEF_DB_POS | $01
- .byte DB_USR_ROUT
- .word DecrRMargin
- .byte DBTXTSTR,$83,$09
- .word OnDisk
- .byte DBVARSTR,$83,$11,r8
- .byte OPEN,$11,$17
- .byte DISK,$11,$29
- .byte DBUSRICON,$11,$3b
- .word Drive
- .byte CANCEL,$11,$4d
- .byte DB_USR_ROUT
- .word InitFBox
- .byte 0
- DecrRMargin:
- dec rightMargin
- OnDisk:
- .byte BOLDON,"On disk:",PLAINTEXT,0
- DriveIcon:
- Drive:
- .word DriveIcon,0
- .byte 6,16
- .word ScrollDrive
- ScrollDrive:
- jsr SwapDrive
- LoadB
- sysDBData,
- DBUSRICON
- jmp RstrFrmDialog
- GotoSource:
- lda SourceDrive
- bra GotoDrive
- GotoTarget:
- lda TargetDrive
- GotoDrive:
- ; Pass drive number in A
- cmp curDrive
- beq 1$
- sta WorkDrive
- jsr SetDevice
- jsr OpenDisk
- 1$ rts
- InitDrives:
- ; Initialize drive access for up to three
- ; drives on an REU equipped system.
- jsr WhichMode ; test graphic mode
- bpl 1$
- LoadB Drive+$04,$86 ; set doubling bit
- InitDrives:
- ; Initialize drive access for up to three
- ; drives on an REU equipped system.
- jsr WhichMode ; test graphic mode
- bpl 1$
- LoadB Drive+$04,$86 ; set doubling bit for GEOS 128
- 1$ MoveB curDrive,BootDrive ; mark boot disk for exit
- sta WorkDrive ; flag as current drive
- MoveB numDrives,TotalDrives
- ; store entry value of numDrives
- ; for recovery on exit
- cmp #$01
- beq 3$ ; if 1, then don't bother with
- ; third drive testing
- ; if 2, check to see if third
- ; drive possible
- lda version ; must be V2.0 for third drive
- cmp #$20
- bcc 3$ ; if not, then exit
- lda driveType+2 ; is there a third drive?
- beq 3$ ; if not, then exit
- and #$0f ; strip RAM flags
- sta maxDrives ; store it
- lda driveType ; test with drive A
- and #$0f ; strip RAM flags
- cmp maxDrives ; test it
- beq 2$ ; if same, no need for REU
- lda sysRAMFlg ; check for REU device
- and #%01000000 ; driver storage
- beq 3$ ; if none, then exit
- 2$ inc numDrives ; add one to numDrives
- 3$ jmp NewDisk ; exit/log active disk
- SwapDrive:
- ldx numDrives ; check for only one drive
- bne 1$
- rts ; don't bother if only one
- 1$ jsr NextDrive ; get next drive number
- sta WorkDrive ; flag new drive as curre
- SwapDrive:
- ldx numDrives ; check for only one drive
- bne 1$
- rts ; don't bother if only one
- 1$ jsr NextDrive ; get next drive number
- sta WorkDrive ; flag new drive as current
- jmp SetDevice ; log new device
- NextDrive:
- lda numDrives ; check for one drive
- cmp #$01
- beq 3$
- add #$08 ; add offset for device #s
- sta maxDrives ; highest highest device #
- ldy WorkDrive ; get current device #
- 1$ iny ; generate next device #
- cpy maxDrives ; have we passed max value?
- bcc 2$
- ldy #$08 ; too high, start at 8 again
- 2$ lda driveType-8,y ; get device type
- beq 1$ ; is there an actual device?
- tya ; yes, return in A
- 3$ lda WorkDrive ; no, return old value in A
- ResetDrives:
- lda BootDrive ; get file's boot drive
- jsr GotoDrive ; activate it
- MoveB TotalDrives,numDrives
- ; restore numDrives to value
- ; saved on execution
- lda sysDBData
- cmp #CANCEL ; did we CANCEL?
- bne 3$
- pla ; yes, pull return
- InitFBox:
- ; pass: A - # of entries (zero if no files)
- ; Y - width of each entry
- ; r15 - buffer of names
- LoadW keyVector,DBKeyHandle ; my modification for cursor keys
- LoadW r15,FNameBuffer
- lda FileTemp
- ldy #$11
- sty nameWidth
- sta highest
- lda #15
- jsr SetPattern
- MoveW r15,list
- jsr FBoxPtrs ;Set pointers to FileBox
- LoadB r2L,BOXBOTTOM+1
- LoadB r2H,BOXBOTTOM+16
- jsr Rectangle
- LoadB r2L,BOXTOP
- lda #$ff
- jsr FrameRectangle ;Outline box
- lda highest
- cmp #MAX_IN_VIEW+1
- bcc 2$
- jsr WhichMode
- bpl 1$
- LoadB *+$0d,$80+BOXLEFT/8+4
- LoadB *+$0a,$80+12
- 1$ jsr i_BitmapUp
- .word fBoxIcons
- .byte BOXLEFT/8+4,BOXBOTTOM+1,12,16
- 2$ LoadW otherPressVec,DoButton
- LoadB ontop,$01
- CmpBI highest,#$08
- bcc 4$
- lda selected
- sub #$04
- bcs 3$
- ldx #$00
- 3$ inx
- stx ontop
- 4$ jmp FillBox
- FBoxPtrs:
- ; sets up box pointers
- LoadB r2L,BOXTOP
- LoadB r2H,BOXBOTTOM
- LoadW r3,BOXLEFT
- LoadW r4,BOXRIGHT
- jsr WhichMode
- bpl 1$
- asl r3
- rol r3
- FBoxPtrs:
- ; sets up box pointers
- LoadB r2L,BOXTOP
- LoadB r2H,BOXBOTTOM
- LoadW r3,BOXLEFT
- LoadW r4,BOXRIGHT
- jsr WhichMode
- bpl 1$
- asl r3
- rol r3H ; r3=r3*2
- asl r4
- rol r4H ; r4=r4*2
- 1$ rts
- NBoxPtrs:
- ; Set pointers to a filename area in box
- ; pass: A = box # (0 to max_in_view-1)
- sta r0L
- LoadB r1L,NAMEHITE
- ldy #r1
- ldx #r0
- jsr BBMult
- jsr FBoxPtrs
- inc r2L
- lda r0L
- add r2L
- sta r2L
- adc #NAMEHITE
- sta r2H
- inc r3L
- bne 1$
- inc r3H
- 1$ ldx #r4
- jmp Ddec
- FillBox:
- ; Fills the current box with names.
- lda highest
- beq 5$ ;Nothing to fill with - exit
- PushW rightMargin
- jsr FBoxPtrs
- MoveW r4,rightMargin ;Don't let text print out of box
- dec rightMargin
- LoadB fbTemp,0
- jsr SetPattern
- LoadB boxStyle,BOLDON ;BOLDON,PLAINTEXT,etc
- jsr PutChar
- 1$ lda fbTemp ;Counter will count from 0 to max_in_view-1
- jsr NBoxPtrs ;Get pointers to name box
- jsr Rectangle ;Clear area
- MoveW r3,r11 ;Set up Horiz. text
- lda r2L ;Add pointsize to Vert text
- add #8
- sta r1H
- lda fbTemp
- add ontop ;Top list entry
- cmp highest ;Past last entry?
- beq 2$ ;Nope, continue
- bcs 4$ ;Yep, we're done!
- 2$ tay
- dey ;make relative to 0
- sty r15
- MoveB nameWidth,r0
- ldx #r0
- ldy #r15
- jsr BBMult ;width * entry #
- AddW list,r0 ;add address of list
- jsr PutString ;Print name
- inc fbTemp
- lda fbTemp
- cmp #MAX_IN_VIEW
- bne 1$
- 4$ jsr Invert ;Invert selected name
- PopW rightMargin
- 5$ rts
- ScrollUp:
- lda highest
- beq ScrollEr
- ScrollUp:
- lda highest
- beq ScrollErr
- ldx ontop
- cpx selected
- bcc 1$
- beq ScrollErr
- jsr Scroll_
- dec selected
- jmp DoAgain ;redraw box & check button
- 1$ jsr Invert
- dec selected
- jmp S_Up_Down
- ScrollDown:
- lda highest
- beq ScrollErr
- cmp selected
- beq ScrollErr
- ldx ontop
- lda selected
- sub ontop
- cmp #MAX_IN_VIEW-1
- bcc 1$
- jsr Scroll_
- inc selected
- jmp DoAgain
- 1$ jsr Invert
- inc selected
- S_Up_Down:
- jsr Invert
- lda mouseData ;if mouse button is still
- bmi 1$ ;press then recall CheckIcons
- jmp CheckIcons ;to process command again
- 1$ rts
- Scroll_:
- pha ;Save new top-of-box
- jsr Invert ;Clear selected name
- sta ontop
- ScrollErr:
- jmp HiBeep
- Invert:
- ; inverts name box whos # in stored in selected
- lda selected ;Get name box #
- sub ontop ;Offset from top box #
- jsr NBoxPtrs ;Set pointers
- jmp InvertRectangle
- ; Far Scrolling - Scroll box to the very top or bottom or up or
- ; down a page. These routines are called by CheckIcons
- BotScroll:
- CmpB highest,selected
- bne 1$
- jmp ScrollErr
- 1$ MoveB highest,selected
- sub #MAX_IN_VIEW-1
- bcs 2$ ;ensure ontop > 0
- bne 2$ ;ensure ontop not 0
- lda #1
- 2$ sta ontop
- jmp FillBox
- TopScroll:
- CmpBI ontop,$01
- bne 1$
- jmp ScrollErr
- 1$ LoadB ontop,$01
- sta selected
- jmp FillBox
- PageUp:
- lda ontop
- cmp #1
- beq ScrollErr
- cmp #MAX_IN_VIEW
- bcc TopScroll
- sub #MAX_IN_VIEW-1
- sta ontop
- sta selected
- jmp DoAgain
- PageDown:
- lda highest
- sub #MAX_IN_VIEW
- sta fbTemp
- cmp ontop
- bcc ScrollErr
- lda ontop
- add #MAX_IN_VIEW-1
- cmp fbTemp
- bcs BotScroll
- sta ontop
- sta selected
- DoAgain:
- jsr FillBox ;re-draw box
- lda mouseData ;if mouse button is still
- bmi 1$ ;press then recall CheckIcons
- jmp CheckIcons ;to process command again
- 1$ rts
- DoButton:
- ; Mouse button handler. Wedged into otherPressVector
- lda mouseData
- bmi 4$ ;Ignore releases
- lda
- DoButton:
- ; Mouse button handler. Wedged into otherPressVector
- lda mouseData
- bmi 4$ ;Ignore releases
- lda highest
- beq 4$ ;Box empty - exit
- jsr FBoxPtrs ;check if mouse in filebox
- LoadB r2H,BOXBOTTOM-2
- jsr IsMseInRegion
- cmp #0
- beq CheckIcons ;nope
- jsr Invert ;Restore current selection
- jsr FBoxPtrs
- lda mouseYPos
- sub #BOXTOP
- sta r0L ;Convert mouseY to 0 offset
- ClrB r0H
- sta r1H
- LoadB r1L,NAMEHITE
- ldx #r0
- ldy #r1
- jsr Ddiv ;mouseY/nameHite = name #
- lda r0L
- add ontop ;Result = selection #
- cmp highest
- bcc 1$ ;Branch if not passed last name
- lda highest
- ldx dblClickCount
- beq 2$
- cmp selected
- bne 3$
- jmp DBDoCR
- ldx #$3f
- stx dblClickCount
- 3$ sta selected
- jsr Invert
- 4$ rts
- CheckIcons:
- lda highest
- cmp #MAX_IN_VIEW+1
- bcc 5$
- LoadB fbTemp,5
- 1$ LoadB r2L,BOXBOTTOM+1
- LoadB r2H,BOXBOTTOM+16
- ldy fbTemp
- lda iconXLTab,y
- sta r4L
- sub #1
- CheckIcons:
- lda highest
- cmp #MAX_IN_VIEW+1
- bcc 5$
- LoadB fbTemp,5
- 1$ LoadB r2L,BOXBOTTOM+1
- LoadB r2H,BOXBOTTOM+16
- ldy fbTemp
- lda iconXLTab,y
- sta r4L
- sub #15
- sta r3L
- ClrB r3H
- sta r4H
- jsr WhichMode
- bpl 2$
- asl r3L
- rol r3H
- asl r4L
- rol r4H
- 2$ jsr IsMseInRegion ;check if on icon
- cmp #0
- beq 4$ ;nope - branch
- jsr InvertRectangle ;flash icon
- ldy #40
- ldx #0 ;now waste some time
- 3$ inx
- bne 3$
- bne 3$
- jsr InvertRectangle ;back to normal
- lda fbTemp ;get execution address
- asl a ;from table
- lda iconExecTab+1,y ;push it on the stack
- lda iconExecTab,y
- rts ;and 'jump' to it
- 4$ dec fbTemp
- bpl 1$
- 5$ rts
- CANCEL ; did we CANCEL?
- bne 3$
- pla ; yes, pull return
- ; This is the main routine to generate the tone
- ;whose freq is passed in X.
- ; The volume of the SID will be left turned up
- ; (the tone will continue for a bit after the routine
- ;returns)
- HiBeep:
- ldx #20
- Beep:
- LoadB CPU_DATA,IO_IN ;take this out for Geos 128
- stx sidbase+1
- ldy #0
- sty sidbase+5 ;Y will be used in loop
- LoadB sidbase+6,%11111001
- LoadB sidbase+15,55
- LoadB sidbase+24,15
- ldx #%00010101
- stx sidbase+4 ;Gate sound on
- 1$ dey
- bne 1$
- bne 1$
- LoadB sidbase+4,%00010100 ;gate off
- LoadB CPU_DATA,RAM_64K
- DBKeyHandle:
- lda keyData
- cmp #CR
- beq DBDoCR
- cmp #KEY_UP
- beq DBDo_UP
- cmp #KEY_DOWN
- beq DBDo_DOWN
- cmp #KEY_LEFT
- beq DBDo_Paging
- DBKeyHandle:
- lda keyData
- cmp #CR
- beq DBDoCR
- cmp #KEY_UP
- beq DBDo_UP
- cmp #KEY_DOWN
- beq DBDo_DOWN
- cmp #KEY_LEFT
- beq DBDo_Paging
- cmp #KEY_RIGHT
- beq DBDo_Paging
- DBDoCR:
- LoadB sysDBData,OPEN
- jmp RstrFrmDialog
- DBDo_UP:
- jmp ScrollUp
- DBDo_DOWN:
- jmp ScrollDown
- DBDo_Paging:
- ldx highest
- cpx #MAX_IN_VIEW
- bcs 1$
- 1$ cmp #KEY_LEFT
- bne 2$
- jmp PageUp
- 2$ jmp PageDown
- iconXLTab:
- .byte BOXRIGHT,BOXRIGHT-16,BOXRIGH
- iconXLTab:
- .byte BOXRIGHT,BOXRIGHT-16,BOXRIGHT-(16*2)
- .byte BOXRIGHT-(16*3),BOXRIGHT-(16*4)
- .byte BOXRIGHT-(16*5)
- iconExecTab:
- .word ScrollUp-1,ScrollDown-1,PageUp-1,PageDown-1
- .word TopScroll-1,BotScroll-1
- fBoxIcons:
- .ramsect
- highest: .block 1 ;Highest entry # in buffer
- ontop: .block 1 ;entry # on top of window
- selected: .block 1 ;Currently selected entry #
- nameWidth: .block 1 ;width of each entry
- boxStyle: .block 1 ;style of box text
- fbTemp: .block 1
- FileTemp: .block 1
- WorkDrive: .block 1
- maxDrives: .block 1
- TotalDrives:
- .block 1
- SourceDrive:
- .block 1
- TargetDrive:
- .block 1
- DATA_TYPE: .block 1
- NewLength: .block 1
- list: .block 2
- OldName: .block 17
- NewName: .block 17
- DriveAName: .block 17
- DriveBName: .block 17
- DriveCName: .block 17
-